﻿@model cloudscribe.Core.Web.ViewModels.SiteUser.SetPasswordViewModel
@inject IStringLocalizer<CloudscribeCore> sr
@{
    ViewData["Title"] = sr["Set Password"];
    ViewData["BodyClass"] = "manage-section set-password";
}
<form asp-controller="Manage" asp-action="SetPassword" asp-route-returnurl="@ViewBag.ReturnUrl" method="post" role="form">
    <h4>@sr["Set your password"]</h4>
    <p class="text-info">
        @sr["You do not have a local username/password for this site. Add a local account so you can log in without an external login."]
    </p>
    <hr />
    <div asp-validation-summary="All" class="text-danger"></div>
    <div class="mb-3">
        <label class="form-label" asp-for="NewPassword">@sr["New Password"]</label>
        <input asp-for="NewPassword" class="form-control" />
        <span asp-validation-for="NewPassword" class="invalid-feedback"></span>
    </div>
    <div class="mb-3">
        <label class="form-label" asp-for="ConfirmPassword">@sr["Confirm Password"]</label>
        <input asp-for="ConfirmPassword" class="form-control" />
        <span asp-validation-for="ConfirmPassword" class="invalid-feedback"></span>
    </div>
    <div class="mb-3">
        <button name="submit" type="submit" class="btn btn-primary">@sr["Set Password"]</button>
    </div>
</form>
@section Scripts {
    <script src="~/cr/js/jquery.validate.min.js"></script>
    <script src="~/cr/js/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/cr/js/unobtrusive-validation-bs4.min.js"></script>
}
